package com.Ajava1704.for设计模式.for责任链模式;

/**
 * 作者: LCG
 * 日期: 2020/2/15 09:03
 * 描述:
 */
public class ForZenRenLianImpl extends ForZenRenLianAbstract implements ForZenRenLian {

    private String name;

    public ForZenRenLianImpl(String name) {
        this.name = name;
    }

    @Override
    public void test() {
        System.out.print(name+"-->");
        if(getForZenRenLian()!=null){
            getForZenRenLian().test();
        }

    }



}
